#ifndef CCHATBOX_H_INCLUDED
#define CCHATBOX_H_INCLUDED

#include "LON.h"

class CGameManager;

class CChatBox
{
  public:
    CChatBox(CGameManager *mgr);
    virtual ~CChatBox();

    //! Show/Hide all GUI Elements
    virtual void setVisible(bool visible);

    //! Append text to the chat box
    void addText(const wchar_t* text, bool fromServer=false);

    //! Set the position of the chat box
    void setPosition(const rect<s32> &position);

    //! Returns the text in the input box
    stringw getText();
  private:
    CGameManager *mgr;
    IGUIEnvironment *env;

    //! This main parent is used to hide / show all elements
    IGUITab * base;

    IGUIListBox *chatOutput;
    IGUIEditBox *chatInput;

    IGUIButton *sendButton;
};

#endif // CCHATBOX_H_INCLUDED
